<form id="form_create_ewallet" name="form_create_ewallet" method="post" action="<?php echo site_url('user/create_account_ewallet/save/')?> " onsubmit="return Send('#form_create_ewallet');" >

	<h1 id="formTitle">Sign Up</h1>
	<p class="headerInfo">To be able to access our full range of services you need to sign up for an account - its easy and its FREE!</p>
	<p>Please complete all the fields below. Fields marked with <span class="required">*</span> are required.<br />
	Once you have submitted the form, you will receive a confirmation e-mail. Then you will be able to log in and join the dynamic world of KashFX eWallet.</p>
	
	<div id="message">
	</div>
	
	<div class="form">
		<div class="line">
			<label>Account type</label>
			<div class="value">
				<span>
					<input value="personal" name="accountType" type="radio" id="accountTypePerson" class="input-radio" checked="checked"  />
					<label for="accountTypePerson" id="accountTypePersonLbl">Personal<br />
						<small style="font-weight:normal;">(for individual customers)</small>
					</label>
				</span>
				<br />
				
				<span>
					<input value="business" name="accountType" type="radio" id="accountTypeBusiness" class="input-radio" />
					<label for="accountTypeBusiness" id="accountTypeBusinessLbl">Company<br />
						<small style="font-weight:normal;">(for legal entities)</small>
					</label>
				</span>
			</div>
			
			<div class="hint" id="hintPerson">
				<span id="accountTypePersonHint" class="msg">
					A personal account is an KashFX eWallet account registered in the name of person. Payments and account management are in the name of the registered person.
				</span>
			</div>
			
			<div class="hint" style="margin-top:40px;" id="hintCompany">
				<span id="accountTypeCompanyHint" class="msg">
					Company account is an KashFX eWallet account registered in the name of the company. Payments and account management are in the name of the registered company.
				</span>
			</div>
		</div>
		
		<div id="Organization" style="display:none;">
			<fieldset>
				<div class="line">
					<label for="organizationName" id="organizationNameLbl">
						Organization Name 
						<span class="required">*</span>
					</label>
					<input name="organizationName" type="text" id="organizationName" class="text" />
					
					<span class="error-validator" style="display:none;">
						<span id="organizationNameErr"></span>
					</span>
				</div>
			</fieldset>
		</div>
		
		<br style="clear:both;" />
		
		<fieldset>
			<div class="line">
				<label for="countryName" id="countryNameLbl">Country 
					<span class="required">*</span>
				</label>
				<select name="countryName" id="countryName">
					<option value="">Select one</option>
					<option value="">-------------------------</option>
						<?php foreach($countries as $item){?>
						<option value='<?php print $item->ID; ?>'
							rel='<?php print $item->AREA_CODE; ?>'>
							<?php print $item->NAME; ?>
						</option>

						<?php }?>
				</select>
				
				<span class="error-validator" style="display:none;">
					<span id="countryNameErr"></span>
				</span>
				
			</div>
			<div class="line">
				<label for="email" id="emailLbl">Email 
					<span class="required">*</span>
				</label>
				<input name="email" type="text" id="email" class="text" />
				<div class="hint">
					<span id="email_Hint" class="msg">
						This email will be used to log into the system, as well as other users will be able to transfer your money on it.
					</span>
				</div>
				<span class="valid-email" style="display: none;">
					<span id="Step1_Email_Free">Email address accepted.</span>
				</span>
				
				<span id="emailLoad" class="loading" style="display: none;"></span>
				
				<span class="error-validator" style="display:none;">
					<span id="emailErr"></span>
				</span>
			</div>
			<div class="line">
				<label for="phoneNumberMobile" id="phoneNumberMobileLbl">Mobile phone number</label>
				<input name="phoneCountryCode" type="text" value="" id="phoneCountryCode" class="text" style="width:33px;" />
				<span style="float:left; padding:4px;">&mdash;</span>
				<input name="phoneNumberMobile" type="text" id="phoneNumberMobile" class="text" style="width:126px;" />
				<div class="hint">
					<span id="phone_Hint" class="msg">
						Please enter your phone number in the format "+1-2345678901", where +1 is an example of the country code. If this is a cell phone, you will be able to receive single-use PIN codes via SMS as an additional OKPAY security option.<br /><br />
						This phone number can also be used to contact you in case there is a problem with your account or transaction. We never share your details with telemarketers.
					</span>
				</div>
				
				<span class="error-validator" style="display:none;">
					<span id="phoneCountryCodeErr"></span>
				</span>
				
				<span class="error-validator" style="display:none;">
					<span id="phoneNumberMobileErr"></span>
				</span>
			</div>
			<div class="line">
				<label for="firstName" id="firstNameLbl">
					First name 
					<span class="required">*</span>
					</label>
				<input name="firstName" type="text" id="firstName" class="text" />
				<div class="hint">
					<span id="firstName_Hint" class="msg">Your first name as it appears on your proof of identity.</span>
				</div>
				
				<span class="error-validator" style="display:none;">
					<span id="firstNameErr"></span>
				</span>
				
			</div>
			<div class="line">
				<label for="lastName" id="lastNameLbl">Last name <span class="required">*</span></label>
				<input name="lastName" type="text" id="lastName" class="text" />
				<div class="hint">
					<span id="lastName_Hint" class="msg">
						Your last name as it appears on your proof of identity.
						<br /> * You can additionally provide your middle name later in your account.
					</span>
				</div>
				
				<span class="error-validator" style="display:none;">
					<span id="lastNameErr"></span>
				</span>
			</div>
		</fieldset>
		<fieldset>
			<div class="line">
				<label for="password" id="passwordLbl">
					Choose a password 
					<span class="required">*</span>
				</label>
				<input name="password" type="password" id="password" class="text" />
				<div class="hint">
					<span id="password_Hint" class="msg">A strong password should:<br />
						- Be at least 8 characters in length<br />
						- Contain both upper and lowercase alphabetic characters (e.g. A-Z, a-z)<br />
						- Have at least one numerical characters (e.g. 0-9)<br />
						- Have at least one special character (e.g. ~ ! @ # $ % ^ &amp; * ( ) - _ + =)
					</span>
				</div>
				
				<span class="error-validator" style="display:none;">
					<span id="passwordErr"></span>
				</span>
				
				<div class="password-strength">
					Password strength
					<div class="bar">
					<div class="metric"></div>
					<div class="level" id="dvPasswordStrength"></div>
					</div>
				</div>
			</div>
			<div class="line">
				<label for="passwordVerify" id="passwordVerifyLbl">
					Re-enter password 
					<span class="required">*</span>
				</label>
				<input name="passwordVerify" type="password" id="passwordVerify" class="text" />
				
				<span class="error-validator" style="display:none;">
					<span id="passwordVerifyErr"></span>
				</span>
			</div>
			<div class="line agree">
					<label>By clicking the button below, I agree with 
						<?php echo anchor(site_url('agreements/service.php'), 'Terms of Service', array("class" => "inner", "onclick" => "return ToggleTextbox('div.license');"));?>
						and 
						<?php echo anchor(site_url('agreements/privacy.php'), 'Privacy Policy', array("class" => "inner", "onclick" => "return ToggleTextbox('div.privacy');"));?>
					</label>
					<div class="textbox license">
						<?php print $this->load->view("agreements/license", true);?>
					</div>
					<div class="textbox privacy">
						<?php print $this->load->view("agreements/privacy", true);?>
					</div>
			</div>
		</fieldset>
		<fieldset class="submit">
			<div class="input-button-block" style="width:100px;">
				<input type="submit" name="submitData" value="Agree & Create Account"  id="submitData" />
			</div>
		</fieldset>
	</div>

	<div style="clear:both;"></div>
<!--	<script type="text/javascript" src="/js/util.js"></script>-->

</form>



<script type="text/javascript">

function checkAjaxEmail(email) {
    $.post("<?php echo site_url('user/create_account_ewallet/mail_check'); ?>",
         { email:  email  },
         function(msg) {
            $("span.loading").hide();
            if (msg.result) {
            	$("#emailErr").parent().removeClass("error-validator").addClass("valid-email");
            	$("#emailErr").html(msg.message);
            	$("#emailErr").parent().show();
            }
            else {
            	$("#emailErr").parent().removeClass("valid-email").addClass("error-validator");
            	$("#emailErr").html(msg.message);
            	$("#emailErr").parent().show();
            }
        },
        "json"
    );
}




</script>
